const common = require('./common');

const url = {
  projectCode: "/zgb/v1/project/projectCode", //获取当前项目码
  detail: "/zgb/v1/project/detail", //获取当前项目详情
  getRosterInfo: "/zgb/v1/project/getRosterInfo", //获取最新花名册记录(申请加入项目)
  getPropertiesForChoose: "/zgb/v1/project/getPropertiesForChoose", //获取可选属性
  getStation: "/zgb/v1/project/getStation", //获取岗位可选属性
  getWorkType: "/zgb/v1/project/getWorkType", //获取工种可选属性
  getOrganizationTree: "/zgb/v1/project/getOrganizationTree", //获取组织结构
  getArea: "/zgb/v1/project/getArea", //获取区域信息
  getCertificateTemplate: "/zgb/v1/project/getCertificateTemplate", //获取人员资质证书模板
  submitRosterInfo: "/zgb/v1/project/submitRosterInfo", //自主提交花名册审批
}


const projectCode = (data) => {
  return common.req(url.projectCode, data, 'post', true);
}
const detail = (data) => {
  return common.req(url.detail, data, 'get', true, false);
}
const getRosterInfo = (data) => {
  return common.req(url.getRosterInfo, data, 'get', true, false);
}
const getPropertiesForChoose = (data) => {
  return common.req(url.getPropertiesForChoose, data, 'get');
}
const getStation = (data) => {
  return common.req(url.getStation, data, 'get');
}
const getWorkType = (data) => {
  return common.req(url.getWorkType, data, 'get');
}
const getOrganizationTree = (data) => {
  return common.req(url.getOrganizationTree, data, 'get');
}
const getArea = (data) => {
  return common.req(url.getArea, data, 'get');
}
const getCertificateTemplate = (data) => {
  return common.req(url.getCertificateTemplate, data, 'get');
}
const submitRosterInfo = (data) => {
  return common.req(url.submitRosterInfo, data);
}




export default {
  projectCode,
  detail,
  getRosterInfo,
  getPropertiesForChoose,
  getStation,
  getWorkType,
  getOrganizationTree,
  getArea,
  getCertificateTemplate,
  submitRosterInfo
}